﻿using System.Reflection;

using boda.net.wpf.application.task.Views;
using boda.net.wpf.core.Extensions;
using boda.net.wpf.core.Ioc;
using boda.net.wpf.share.Prism;

using Prism.Ioc;
using Prism.Modularity;
using Prism.Regions;

namespace boda.net.wpf.application.task
{
    [Module(ModuleName = ModuleNames.ApplicationTaskModule)]
    public class ApplicationTaskModule : IModule
    {
        public void OnInitialized(IContainerProvider containerProvider)
        {
            containerProvider.InitialAssembly(Assembly.GetExecutingAssembly());
            PrismProvider.RegionManager.RegisterViewWithRegion<TaskView>(RegionNames.TaskRegion);
        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterAssembly(Assembly.GetExecutingAssembly());
        }
    }
}
